#include<iostream>
using namespace std;

#include<string>


int main()
{
	std::string str1;
	std::string str2;
	getline(cin, str1);
	getline(cin, str2);

	auto it1 = str1.begin();
	

	while (it1 != str1.end())
	{
		auto it2 = str2.begin();
		while (it2 != str2.end())
		{
			if (*it1 == *it2)
			{
				it1 = str1.erase(it1);
			}

			++it2;
		}

		++it1;
	}

	cout << str1 << endl;

	return 0;
}